package br.edu.ufcg.msnlab2.grupo04.ChebHermLagueLege;

import br.edu.ufcg.msnlab2.InvalidFunctionException;
import br.edu.ufcg.msnlab2.misc.FunctionImpl;

public class Chebyshev {
	private static final double T = 8.66025403784438646787e-01;
	private static final double PESO = 1.04719755119659774613e+00;
	
	private static FunctionImpl funcao; 

	public static double integralGaussChebyshev( String func ) throws InvalidFunctionException {
		
		funcao = new FunctionImpl(func);
		
		return PESO * (funcao.evaluate(T) + funcao.evaluate(-T) + funcao.evaluate(0.0));
	}

}
